package com.example.concurrent.example.atomic;

/**
 * Author    lingchen
 * Email     838878458@qq.com
 * Time      2018/8/1
 * Function  ...
 */
public class Single {


    public static Single getInstance() {
        return SingleEnum.INSTANCE.getSingle();
    }

    private enum SingleEnum {
        INSTANCE;
        private Single single;

        SingleEnum() {
            single = new Single();
        }

        public Single getSingle() {
            return single;
        }
    }

}
